package com.wsx.rpc.comsat.actor;

import co.paralleluniverse.fibers.SuspendExecution;
import co.paralleluniverse.strands.Strand;

/**
 * @author wangshuaixin
 * @Title: com.wsx.rpc.comsat.actor.CounterImpl
 * @Description: TODO
 * @date 2018/11/28
 */
public class CounterImpl implements Counter {

    int count;

    @Override
    public String count(String text) throws SuspendExecution {
        try {
            Strand.sleep(20);
            return "response from simple proxy server :" + text + "::" + (count ++);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
}
